package cn.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.mapper.DetailMapper;
import cn.pojo.Detail;

@Service
@Transactional
public class DetailServiceImpl implements DetailService {
	@Resource
	private DetailMapper detailMapper;

	@Override
	public Integer totalCount(Long sortId) {
		return detailMapper.totalCount(sortId);
	}

	@Override
	public List<Detail> getAllDetails(Long sortId, Integer rowNum, Integer pageCount) {
		return detailMapper.getAllDetails(sortId, rowNum, pageCount);
	}

	@Override
	public Detail getDetailById(Integer id) {
		return detailMapper.getDetailById(id);
	}

	@Override
	public int updateDetail(int s, Long id) {
		return detailMapper.updateDetail(s, id);
	}

}
